import request from '@/utils/request'

// 查询客户列表
export function listDUser(query) {
  return request({
    url: '/video/DUser/list',
    method: 'get',
    params: query
  })
}

// 查询客户详细
export function getDUser(id) {
  return request({
    url: '/video/DUser/' + id,
    method: 'get'
  })
}

// 新增客户
export function addDUser(data) {
  return request({
    url: '/video/DUser',
    method: 'post',
    data: data
  })
}

// 修改客户
export function updateDUser(data) {
  return request({
    url: '/video/DUser',
    method: 'put',
    data: data
  })
}

// 用户密码重置
export function resetUserPwd(id, password) {
  const data = {
    id,
    password
  }
  return request({
    url: '/video/DUser/resetPwd',
    method: 'put',
    data: data
  })
}

// 删除客户
export function delDUser(id) {
  return request({
    url: '/video/DUser/' + id,
    method: 'delete'
  })
}
